﻿<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<%@ taglib prefix="sec" uri="http://www.springframework.org/security/tags" %>

<sec:authentication property="principal" var="currentPrincipal" scope="page" />

  <table data-toggle="table" class="table table-striped table-hover">
    <thead>
      <tr>
        <th data-align="center">学员</th>
        <th data-align="center">课程</th>
        <th data-align="center">课程类型</th>
        <th data-align="center">已签到课时数</th>
      </tr>
    </thead>
    <tbody>
      <c:forEach var="coachStudentRelation" items="${coachStudentRelations}">
        <tr>
          <td>${coachStudentRelation.student.name}</td>
          <td>${coachStudentRelation.courseSchedule.course.name}</td>
          <td>${coachStudentRelation.courseType.description}</td>
          <td>${coachStudentRelation.signedAmount}</td>
        </tr>
      </c:forEach>
    </tbody>
  </table>

  <div class="form-horizontal clearfix" style="margin-top: 20px;">

    <div class="form-group pull-left" style="width: 60%">
      <label class="control-label col-xs-3">查询总计：</label>
      <div class="col-xs-4" style="padding-left: 0px;">
        <p class="form-control-static">${total} 条记录</p>
      </div>
    </div>

    <jsp:include page="/WEB-INF/include/page.jsp">
      <jsp:param name="url" value="principals/${principal.id}/grid" />
      <jsp:param name="queryString" value="${queryString}" />
    </jsp:include>

  </div>

  <script>
  $("#grid-wrap table").bootstrapTable({
    height: 350,
    striped: true
  });
  </script>
